* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow: hidden;
}

body {
  perspective:2000px;
  background-color: black;
}

.container {
  width: 100vw;
  height: 100vh;
  transform-style: preserve-3d;
  position: relative;
  animation: rotate 20s infinite linear;

  img {
    position: absolute;
    width: 300px;
    height: 400px;
    top: 50%;
    left: 50%;
    margin-left: -150px;
    margin-top: -200px;
    backface-visibility: hidden;

    @for $i from 1 through 10 {
      &:nth-child(#{$i}) {
        transform: rotateY(#{($i - 1) * 36}deg) translateZ(-600px);
      }
    }
  }
}

@keyframes rotate {
  from {
    transform: rotateY(0);
  }
  to {
    transform: rotateY(360deg);
  }
}
